{layout name='public/layout.html'}
<h3 class="page-header">管理中心</h3>

<!-- 仪表板组件 -->
<div class="row">
    <div class="col-xs-6 col-sm-3">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">用户总数</h3>
            </div>
            <div class="panel-body">
                {php $count=db('user')->count()}
                {$count}
            </div>
        </div>
    </div>
    <div class="col-xs-6 col-sm-3">
        <div class="panel panel-success">
            <div class="panel-heading">
                <h3 class="panel-title">今日新增</h3>
            </div>
            <div class="panel-body">
                {php $today_count=db('user')->where('create_time','>',strtotime(date('Y-m-d')))->count()}
                {$today_count}
            </div>
        </div>
    </div>
    <div class="col-xs-6 col-sm-3">
        <div class="panel panel-warning">
            <div class="panel-heading">
                <h3 class="panel-title">文集数</h3>
            </div>
            <div class="panel-body">
                {php $b_count=db('book')->count()}
                {$b_count}
            </div>
        </div>
    </div>
    <div class="col-xs-6 col-sm-3">
        <div class="panel panel-danger">
            <div class="panel-heading">
                <h3 class="panel-title">文档数</h3>
            </div>
            <div class="panel-body">
                {php $d_count=db('doc')->count()}
                {$d_count}
            </div>
        </div>
    </div>
</div>
<div class="well">欢迎光临，<code>{:session('user.nickname')}</code></div>

<div class="table-responsive">
    <table class="table table-striped">
        <tbody>
        {foreach $sys as $k=>$v}
        <tr>
            <td>{$k}</td>
            <td>{$v}</td>
        </tr>
        {/foreach}
        <tr>
            <td>框架版本</td>
            <td>__POWERED__ [ <a href="https://www.aphp.top" target="_blank">查看最新版本</a> ]</td>
        </tr>
        </tbody>
    </table>
</div>